<?php

/**
 * 第三方登陆管理
 * @author Ice <iceinto@mallog.com.cn>
 */
class OAuthModel extends BaseModel {
	public $tableName  = 'oauth';
	public function getOne($site, $openid){
		$map = array();
		$map['site'] = $site;
		$map['openid'] = $openid;
		return $this->where($map)->find();
	}
	public function getUserBind($uid){
		$map = array();
		$map['uid'] = $uid;
		return $this->where($map)->select();
	}
	public function getUserOneBind($uid, $site){
		$map = array();
		$map['uid'] = $uid;
		$map['site'] = $site;
		return $this->where($map)->find();
	}
}